library(tidyverse)
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.1 ──
## ✓ ggplot2 3.3.4 ✓ purrr 0.3.4
## ✓ tibble 3.1.2 ✓ dplyr 1.0.7
## ✓ tidyr 1.1.3 ✓ stringr 1.4.0
## ✓ readr 1.4.0 ✓ forcats 0.5.1
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## x dplyr::filter() masks stats::filter()
## x dplyr::lag() masks stats::lag()
library(plotly)
##
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
##
## last_plot
## The following object is masked from 'package:stats':
##
## filter
## The following object is masked from 'package:graphics':
##
## layout
The following is a interactive package that I wanted to try and learn. It does not require all the needs that R Shiny does, however, this also means that this package is much simpler.
##Interaction Visuals##
fig = coffee %>%
plot_ly(
x = ~total_cup_points,
y = ~cupper_points,
color = ~color,
colors = "Accent",
text = ~variety,
hoverinfo = "text",
type = 'scatter',
mode = 'markers'
)
fig
fig = coffee %>%
plot_ly(
x = ~total_cup_points,
y = ~cupper_points,
split = ~processing_method,
color = ~color,
colors = "Accent",
text = ~variety,
hoverinfo = "text",
type = 'scatter',
mode = 'markers'
)
fig
fig = coffee %>%
plot_ly(
x = ~total_cup_points,
y = ~flavor,
split = ~color,
color = ~processing_method,
colors = "Accent",
text = ~variety,
hoverinfo = "text",
type = 'scatter',
mode = 'markers'
)
fig
fig = coffee %>%
plot_ly(
x = ~total_cup_points,
y = ~clean_cup,
split = ~color,
color = ~processing_method,
colors = "Accent",
text = ~variety,
hoverinfo = "text",
type = 'scatter',
mode = 'markers'
)
fig